#ifndef ENDPOINTVOLUMEOBJECT_H
#define ENDPOINTVOLUMEOBJECT_H

#include <QObject>

#include <endpointvolume.h>

class EndpointVolumeObject : public QObject, public IAudioEndpointVolumeCallback
	{
		Q_OBJECT

		public:
			explicit EndpointVolumeObject(QObject *parent = 0);

			ULONG STDMETHODCALLTYPE AddRef();
			HRESULT STDMETHODCALLTYPE OnNotify(PAUDIO_VOLUME_NOTIFICATION_DATA);
			HRESULT STDMETHODCALLTYPE QueryInterface(REFIID, void **);
			ULONG STDMETHODCALLTYPE Release();

			void setCurrentMute(bool m)
				{ curr_mute = m; }

			void setCurrentVolume(int v)
				{ curr_vol = v; }

		private:
			LONG c_ref;
			bool curr_mute;
			int curr_vol;

		signals:
			void deviceMuteChanged(bool);
			void deviceVolumeChanged(int);
	};

#endif // ENDPOINTVOLUMEOBJECT_H
